import React, { Component } from 'react';
import Message from './Message';
import News from './News';
import MyLink from '../../components/MyLink';
import {Switch,Route} from 'react-router-dom';

export default class Home extends Component {
    render() {
        return (
            <div>
                 <h2>Home组件内容</h2>
                 <div>
                     <ul className="nav nav-tabs">
                          <li>
                              <MyLink to='/home/message'>Message</MyLink>
                          </li>
                          <li>
                              <MyLink to='/home/news'>News</MyLink>
                          </li>
                     </ul>
                     <Switch>
                          <Route path='/home/message' component={Message}/>
                          <Route path='/home/news'  component={News}/>
                     </Switch>
                 </div>
            </div>
        )
    }
}
